﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;
using System.Xml;
using System.Xml.Linq;

namespace Services.Host.Contracts
{
    [DataContract(Namespace = "http://schemas.conducido.nl/BizTalkOpSuite/Messagelog/2012/01")]
    public class MessageToLog
    {
        /// <summary>
        /// Id where you can follow a chain
        /// </summary>
        [DataMember]
        public Guid CorrelationId { get; set; }

        /// <summary>
        /// Name of the service
        /// Before using this think ahead of a common name for service. In the example the Servicename from WCF is used.
        /// </summary>
        [DataMember]
        public string Service { get; set; }

        /// <summary>
        /// Name of action/operation
        /// </summary>
        [DataMember]
        public string Operation { get; set; }

        /// <summary>
        /// The message itself
        /// </summary>
        [DataMember]
        public XElement Message { get; set; }

        /// <summary>
        /// Id of the message (request & reply uses the same messageid
        /// </summary>
        [DataMember]
        public Guid MessageId { get; set; }

        /// <summary>
        /// Direction of the message
        /// </summary>
        [DataMember]
        public Direction MessageDirection { get; set; }

        /// <summary>
        /// datetime of when the message was recorded within service
        /// </summary>
        [DataMember]
        public DateTime Timestamp { get; set; }

        /// <summary>
        /// Name of the process hosting the service or client
        /// </summary>
        [DataMember]
        public string Process { get; set; }

        /// <summary>
        /// Id of the process
        /// </summary>
        [DataMember]
        public int ProcessId { get; set; }

        /// <summary>
        /// Url used by the service
        /// </summary>
        [DataMember]
        public string Url { get; set; }

        /// <summary>
        /// Servername
        /// </summary>
        [DataMember]
        public string Servername { get; set; }
    }
}